<template>
  <div class="result-content" :class="this.$store.currentTheme">
    <div class="text-info">
      <span v-html="text"></span>
    </div>
    <div class="table-data" v-if="!hidedTable">
      <el-table :data="table.data" border style="width: 100%">
        <el-table-column
          v-for="item in table.fields"
          :key="item.columnName"
          :label="item.columnName"
          :prop="item.columnName"
        >
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      placeholder: '尚未运行代码...',
      text: '尚未运行代码...',
      hidedTable: true,
      table: {
        fields: [],
        data: [],
      },
    };
  },
  methods: {},
};
</script>

<style>
.text-info {
  white-space: pre-line;
  padding: 10px;
}

.result-content {
  height: 100%;
  padding: 0 5px;
  text-align: left;
  overflow-x: auto;
  overflow-y: auto;
}

.table-data {
  height: 0px;
}
</style>
